package org.xteam.box2text;

import java.util.Arrays;


public class Line {

	private String contents;
	
	public Line(String contents) {
		this.contents = contents;
	}
	
	public Line(int length) {
		char[] data = new char[length];
		Arrays.fill(data, ' ');
		this.contents = new String(data);
	}

	public Line concat(Line other) {
		return new Line(contents + other.contents);
	}
	
	public int width() {
		return contents.length();
	}
	
	public Line blank() {
		char[] data = new char[contents.length()];
		Arrays.fill(data, ' ');
		return new Line(new String(data));
	}
	
	public String toString() {
		return contents;
	}

}
